GXPostScriptScanPrinterText
QuickDraw GX sends theGXPostScriptScanPrinterText
message after getting a printer data message back from the printer to interpret and prepare the printer string. You can override theGXPostScriptScanPrinterText
message if the printer string contains information you wish to use or if the device to which the workstation is connected has a format different from that of Apple LaserWriters. Your override of theGXPostScriptScanPrinterText
message must match the following formal declaration:
OSErr MyPostScriptScanPrinterText (Handle printerTextHdl);
printerTextHdl
- A handle to the text returned in the
GXPostScriptGetPrinterText
message.- function result
- An error code. The value
noErr
indicates that the operation was successful.DESCRIPTION
QuickDraw GX sends theGXPostScriptScanPrinterText
message every time any text is returned from theGXPostScriptGetPrinterText
message (that is, when this message does not return an empty buffer). TheGXPostScriptScanPrinterText
message interprets the text of the printer string to determine the state of the printing process. It performs error detection and reporting, using the Postscript scan ('scan'
) resource to interpret the string.The default implementation of this message searches the text string for special keywords that determine the status of the printing device. It also reformats the string for reading by a user and calls the
GXReportStatus
function to display the string in the desktop printer window.You need to override this message when part or all of the printer string holds some piece of information that is only meaningful to you or if the device to which the workstation is connected has a format different from that of Apple LaserWriters. Only the Apple LaserWriter format is understood by the default implementation of this message.
SPECIAL CONSIDERATIONS
You can partially or totally override theGXPostScriptScanPrinterText
message.RESULT CODES
The default implementation of the
gxSegmentLoadFailedErr A required code segment could not be found,
or there was not enough memory to load it.gxPrUserAbortErr The user has canceled printing. GXPostScriptScanPrinterText
message can also return the communications errors that are listed in Table 4-2 on page 4-42.SEE ALSO
TheGXPostScriptGetPrinterText
message is described on page 4-107.An example of using the
GXPostScriptGetPrinterText
andGXPostScriptScanPrinterText
messages is shown in Listing 4-1 on page 4-109.The
GXReportStatus
functon is described on page 5-17 in the chapter "Printing Functions for Message Overrides."
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help